#include "stdafx.h"
#include "Element.h"
#include "Renderer.h"

using namespace Rendering;
using namespace DirectX;

/// <summary>Default constructor.</summary>
Element::Element()
{
	this->Position = XMFLOAT3(0.0f, 0.0f, 0.0f);
}

/// <summary>Renders the object.</summary>
/// <param name="renderer">The renderer to render this object.</param>
void Element::Render(_In_ Renderer* renderer)
{
	if (this->GetMesh() == nullptr || this->GetShader() == nullptr)
        return;

	this->GetShader()->Render(renderer);
    this->GetMesh()->Render(renderer);
}